# -*- coding: utf-8 -*- 
#
# Description:
#
#  Definiton
#
#
#
# Changes:
#
# 2012-01-10
# Initial Commit
#
#
# Copyright 2010-2012, WyDev Team.
# Author: Polo35 (polo35580@hotmail.fr)
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 68
n 68(None)[return True
]:
	i: 51(), 67()
	o: 

nname: 67
n 67(None)[]:
	i: 0(f)
	o: 68()

nname: 51
n 51(None)[louie_send('event_down', sender=self.player)
]:
	i: 24&40(t), 47()
	o: 68()

nname: 47
n 47(None)[]:
	i: 24&40(f)
	o: 51()

nname: 24&40
n 24&40(val < 0 and 'event_up')[]:
	i: 0(t)
	o: 47(f), 51(t)

nname: 0
n 0(ret)[ret = self.player.select(val)
]:
	i: 
	o: 24&40(t), 67(f)

nname: 68
n 68(None)[return True
]:
	i: 24&40(), 0(f)
	o: 

nname: 24&40
n 24&40(None)[if not(val < 0 and 'event_up'):
	pass
louie_send('event_down', sender=self.player)
]:
	i: 0(t)
	o: 68()

nname: 0
n 0(ret)[ret = self.player.select(val)
]:
	i: 
	o: 24&40(t), 68(f)

nname: 0
n 0(None)[ret = self.player.select(val)
if ret:
	if not(val < 0 and 'event_up'):
		pass
	louie_send('event_down', sender=self.player)
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75d940c>}
nname: 0
n 0(None)[self._move(-event.arg['count'])
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75d4f2c>}
nname: 54
n 54(None)[return True
]:
	i: 36(), 53()
	o: 

nname: 53
n 53(None)[]:
	i: 0(f)
	o: 54()

nname: 36
n 36(None)[self._move(val)
]:
	i: 0(t)
	o: 54()

nname: 0
n 0(self.player.selected_pos + val >= 0)[val = -event.arg['count']
]:
	i: 
	o: 36(t), 53(f)

nname: 0
n 0(None)[val = -event.arg['count']
if self.player.selected_pos + val >= 0:
	self._move(val)
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75d95ec>}
nname: 0
n 0(None)[self._move(event.arg['count'])
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75d4ecc>}
nname: 0
n 0(None)[self.player.focus_previous()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75d4f4c>}
nname: 0
n 0(None)[self.player.focus_next()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75d4f2c>}
nname: 54
n 54(None)[sel.execute()
return True
]:
	i: 45(), 53()
	o: 

nname: 53
n 53(None)[]:
	i: 0(f)
	o: 54()

nname: 45
n 45(None)[return True
]:
	i: 0(t)
	o: 54()

nname: 0
n 0(sel is None)[ac = self.player.active_list
sel = self.player.get_item_list(ac).selected
]:
	i: 
	o: 45(t), 53(f)

nname: 0
n 0(None)[ac = self.player.active_list
sel = self.player.get_item_list(ac).selected
if sel is None:
	return True
sel.execute()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75d972c>}
nname: 6
n 6(None)[def _move(self, val):
	ret = self.player.select(val)
	if ret:
		if not(val < 0 and 'event_up'):
			pass
		louie_send('event_down', sender=self.player)
	return True

def event_up(self, event):
	self._move(-event.arg['count'])
	return True

def event_wheel_rwd(self, event):
	val = -event.arg['count']
	if self.player.selected_pos + val >= 0:
		self._move(val)
	return True

def event_down(self, event):
	self._move(event.arg['count'])
	return True

event_wheel_fwd = event_down
def event_left(self, event):
	self.player.focus_previous()
	return True

def event_right(self, event):
	self.player.focus_next()
	return True

def event_select(self, event, list_name='main_list'):
	ac = self.player.active_list
	sel = self.player.get_item_list(ac).selected
	if sel is None:
		return True
	sel.execute()
	return True

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb75d4b8c>}
nname: 0
n 0(None)[self.player.focus_previous()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75d4c0c>}
nname: 0
n 0(None)[self.player.focus_next()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75d4c2c>}
nname: 0
n 0(None)[self.player.selected.execute()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75d48ac>}
nname: 0
n 0(None)[self.player.cancel()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75d4b4c>}
nname: 6
n 6(None)[def event_left(self, event):
	self.player.focus_previous()
	return True

def event_right(self, event):
	self.player.focus_next()
	return True

def event_select(self, event):
	self.player.selected.execute()
	return True

def event_stop(self, event):
	self.player.cancel()
	return True

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb75d470c>}
nname: 0
n 0(None)[return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75d4b6c>}
nname: 0
n 0(None)[return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75d48ac>}
nname: 0
n 0(None)[return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75d488c>}
nname: 6
n 6(None)[event_up = MultipleChoicesMenuEventHandler.event_down
event_down = MultipleChoicesMenuEventHandler.event_up
def event_volume_up(self, event):
	return True

def event_volume_down(self, event):
	return True

def event_mute(self, event):
	return True

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb75d4a4c>}
nname: 0
n 0(None)[from __future__ import absolute_import
from .. import EventDispatcher
from .core import MenuEventHandler
from peewee.messages import send as louie_send
class ParametersSubMenuEventHandler(EventDispatcher):
	def _move(self, val):
		ret = self.player.select(val)
		if ret:
			if not(val < 0 and 'event_up'):
				pass
			louie_send('event_down', sender=self.player)
		return True

	def event_up(self, event):
		self._move(-event.arg['count'])
		return True

	def event_wheel_rwd(self, event):
		val = -event.arg['count']
		if self.player.selected_pos + val >= 0:
			self._move(val)
		return True

	def event_down(self, event):
		self._move(event.arg['count'])
		return True

	event_wheel_fwd = event_down
	def event_left(self, event):
		self.player.focus_previous()
		return True

	def event_right(self, event):
		self.player.focus_next()
		return True

	def event_select(self, event, list_name='main_list'):
		ac = self.player.active_list
		sel = self.player.get_item_list(ac).selected
		if sel is None:
			return True
		sel.execute()
		return True



class MultipleChoicesMenuEventHandler(MenuEventHandler):
	def event_left(self, event):
		self.player.focus_previous()
		return True

	def event_right(self, event):
		self.player.focus_next()
		return True

	def event_select(self, event):
		self.player.selected.execute()
		return True

	def event_stop(self, event):
		self.player.cancel()
		return True



class SecretCodeMenuEventHandler(MultipleChoicesMenuEventHandler):
	event_up = MultipleChoicesMenuEventHandler.event_down
	event_down = MultipleChoicesMenuEventHandler.event_up
	def event_volume_up(self, event):
		return True

	def event_volume_down(self, event):
		return True

	def event_mute(self, event):
		return True



]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75cdaac>}
from __future__ import absolute_import
from .. import EventDispatcher
from .core import MenuEventHandler
from peewee.messages import send as louie_send
class ParametersSubMenuEventHandler(EventDispatcher):
	def _move(self, val):
		ret = self.player.select(val)
		if ret:
			if not(val < 0 and 'event_up'):
				pass
			louie_send('event_down', sender=self.player)
		return True

	def event_up(self, event):
		self._move(-event.arg['count'])
		return True

	def event_wheel_rwd(self, event):
		val = -event.arg['count']
		if self.player.selected_pos + val >= 0:
			self._move(val)
		return True

	def event_down(self, event):
		self._move(event.arg['count'])
		return True

	event_wheel_fwd = event_down
	def event_left(self, event):
		self.player.focus_previous()
		return True

	def event_right(self, event):
		self.player.focus_next()
		return True

	def event_select(self, event, list_name='main_list'):
		ac = self.player.active_list
		sel = self.player.get_item_list(ac).selected
		if sel is None:
			return True
		sel.execute()
		return True



class MultipleChoicesMenuEventHandler(MenuEventHandler):
	def event_left(self, event):
		self.player.focus_previous()
		return True

	def event_right(self, event):
		self.player.focus_next()
		return True

	def event_select(self, event):
		self.player.selected.execute()
		return True

	def event_stop(self, event):
		self.player.cancel()
		return True



class SecretCodeMenuEventHandler(MultipleChoicesMenuEventHandler):
	event_up = MultipleChoicesMenuEventHandler.event_down
	event_down = MultipleChoicesMenuEventHandler.event_up
	def event_volume_up(self, event):
		return True

	def event_volume_down(self, event):
		return True

	def event_mute(self, event):
		return True



